Hi Tom,
Thanks for the quick response. Is there a way to simply discard the console queue if it gets beyond a certain threshold (i.e. no PC is accepting the messages)? We would like to retain the messages for diagnostic purposes, but obviously they need to be discarded if no PC.
To give up when half the buffer is used, would
if ((NextAvailIn-NextAvailOut & MAX_NSTRINGS-1) > MAX_NSTRINGS/2)
NextAvailOut=NextAvailIn;
work?
On a related note, I noticed when restarting the PC in this situation, it would get awfully confused. I'm using the Linux version of KMotionServer, and it seems to have a flaw in that it gets confused when initially opening the USB port if there is outstanding data coming from the kflop. It obviously needs to be modified to rapidly discard pending data like console messages until it can sync to the data stream.
Currently, in CKMotionIO::FlushInputBuffer() at the end it waits for 3 chars ESC, 'C', '\r' but that doesn't seem to always work reliably after unusual situations. Maybe SendAbortOnConnect is not getting set.